// 获取json5中模拟数据
import res from '../../../../../data/hotlinemanagementCfg.json';

export default {
  namespace: 'hotlineManagement',
  state: {
    tabsModule: [],
    echartsModule: [],
    loading: true
  },

  effects: {
    *fetchData({ payload }, { call, put }) {
      const { data: { tabsModule, echartsModule } } = res;
      yield put({
        type: 'saveState',
        payload: {
          tabsModule,
          echartsModule,
          loading: false
        }
      })
    }
  },
  reducers: {
    saveState(state, { payload }) {
      return { ...state, ...payload };
    }
  },
};

